#include "Camera.h"

Camera::Camera()
{
	camera_rect.top = 0;
	camera_rect.left = 0;
	camera_rect.right = camera_rect.left + 800;
	camera_rect.bottom = camera_rect.top + 600;
}

Camera::~Camera()
{
}

void Camera::update(D3DXVECTOR2 position)
{
	camera_rect.left = position.x - 400;
	if (camera_rect.left < 0)
		camera_rect.left = 0;
	
}

//D3DXMATRIX Camera::GetMatrix()
//{
//	D3DXMATRIX matrixTransform;
//	
//
//	//D3DXMatrixIdentity(&matrixTransform);
//	//D3DXMatrixRotationZ(&matrixTransform, D3DXToRadian(90.0f));
//	//D3DXMatrixPerspectiveFovLH(&matrixTransform, D3DX_PI/4, 500/500, 1, 50);
//	
//	//D3DXMatrixAffineTransformation2D(&matrixTransform, 1.0f, NULL, 0.0f, &D3DXVECTOR2(-cameraRect.left, -cameraRect.top));
//
//	//D3DXMatrixTranslation(&matrixTransform, -cameraRect.left, -cameraRect.right, 1);
//
//	D3DXMatrixTranslation(&matrixTransform, -cameraRect.left, -cameraRect.top, 1);
//	return matrixTransform;
//}